/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package isnmp.ui;

import isnmp.ui.dto.MachineInfo;
import java.util.ArrayList;
import java.util.List;
import javax.swing.table.AbstractTableModel;
import sg.simple.snmp.stats.OidCode;
import sg.simple.snmp.stats.TableData;


/**
 *
 * @author nuwan
 */
public class MachineInfoTableModel extends AbstractTableModel {


    MachineInfo machineInfo;

    public MachineInfoTableModel(MachineInfo r) {
        this.machineInfo = r;
    }
    
    @Override
    public String getColumnName(int column) {
     
        
        return "";
        
        
        
            
    }  




    @Override
    public int getRowCount() {
        return this.machineInfo.getValues().size();
    }

    @Override
    public Object getValueAt(int row, int column) {
        
        OidCode[] enumVals = OidCode.values();
        
        
        
        if ( column == 0 ){
            
            return enumVals[row].getName();
            
        }else{
            return machineInfo.getValues().get(enumVals[row]);
        }
        
    }

    @Override
    public int getColumnCount() {
        return 2;
    }


}
